package com.supermap.rootstock.admin.aritmetic;

import com.supermap.rootstock.admin.api.entity.Arithmetic;
import com.supermap.rootstock.admin.api.util.JSONUtil;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * @author aqua
 * @description
 * @date 2019年09月12 14:59
 * @email 1301584033@qq.com
 */
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/arithmetic")
public class AritmeticController {
	private final AritmeticService aritmeticService;

	@GetMapping("/getPageArithmeticList")
	@ResponseBody
	 public JSONUtil getPageArithmeticList(String name, Integer systemId, Integer  langId, Integer pageNum, Integer pageSize){
	 	return  aritmeticService.getPageArithmeticList(name,systemId,langId,pageNum,pageSize);
	 }


	@GetMapping("/getArithmeticById")
	@ResponseBody
	public JSONUtil getArithmeticById(Integer aId){
		return  aritmeticService.getArithmeticById(aId);
	}


	@GetMapping("/getArithmeticLangList")
	@ResponseBody
	public JSONUtil getArithmeticLangList(){
		return  aritmeticService.getArithmeticLangList();
	}



	@GetMapping("/getArithmeticSystemList")
	@ResponseBody
	public JSONUtil getArithmeticSystemList(){
		return aritmeticService.getArithmeticSystemList();
	}


	@PutMapping("/putArithmetic")
	@ResponseBody
	public JSONUtil putArithmetic(@RequestBody Arithmetic arithmetic){
		return  aritmeticService.putArithmetic(arithmetic);
	}
	@PostMapping("/postAudit")
	@ResponseBody
	public JSONUtil  postAudit(Integer state, Integer suserId,String scontent){
		return  aritmeticService.postAudit(state,suserId,scontent);
	}
}
